﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mad.Infrastructure.DomainServices
{
    public class Constants
    {
        public class Message {
            public const string REQUIRE_FIELD = "This field is required";
        }
        public class Table {
            public const string QUERY_ALL_TABLE_SCHEMA = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' ORDER BY TABLE_NAME";
            public const string QUERY_ALL_FIELDS_FROM_TABLE_SCHEMA = "SELECT * FROM {0}";
            public const string QUERY_TABLE_INFORMATION_SCHEMA = "SELECT COLUMN_NAME,COLUMNPROPERTY( OBJECT_ID('{0}.{1}'),COLUMN_NAME,'IsComputed')AS 'IsComputed' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '{0}' AND TABLE_NAME = '{1}'";
        }
    }
}
